.state {
    width: 300px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
canvas{
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    border: 1px solid #000;
}